package com.croot.infra.${projectFlag}.dto.request;

import com.croot.infra.${projectFlag}.adapter.rdb.po.${entityName}PO;
import java.util.Objects;
import lombok.Data;

@Data
public class ${entityName}IdReqDTO {

<#list columnInfos as column>
   <#if column.humpColumnName ?ends_with("id")>
    private String ${column.humpColumnName!};
   </#if>
</#list>

    public ${entityName}PO convertToPO() {
        ${entityName}PO ${entityParamName}PO = new ${entityName}PO();

<#list columnInfos as column>
    <#if column.humpColumnName ?ends_with("id")>
        if (Objects.nonNull(this.${column.humpColumnName!})) {
            ${entityParamName}PO.set${column.humpColumnName! ? cap_first}(Long.parseLong(this.${column.humpColumnName!}));
        }
    </#if>
</#list>

        return ${entityParamName}PO;
    }
}
